const navRouter = [{
  path: "/",
  name: "Home",
  redirect: "/project/list",
  component: () => import(/* webpackChunkName: "Home" */ "../pages/home/home.vue"),
  children: [
    {
      path: "project",
      name: "MyProject",
      component: () => import(/* webpackChunkName: "my-project" */ "../pages/my-project/index.vue"),
      children: [
        {
          path: "list",
          name: "MyProject",
          component: () => import(/* webpackChunkName: "my-project" */ "../pages/my-project/my-project.vue"),
          meta: { title: "我的工程" }
        }
      ]
    },
    {
      path: "data",
      name: "MyData",
      component: () => import(/* webpackChunkName: "my-data" */ "../pages/my-data/index.vue"),
      redirect: "/data/source",
      meta: { title: "我的数据" },
      children: [
        {
          path: "source",
          name: "MySource",
          component: () => import(/* webpackChunkName: "my-source-list" */ "../pages/my-data/my-source.vue"),
          meta: { title: "我的数据源" }
        },
        {
          path: "type",
          name: "MySourceData",
          component: () => import(/* webpackChunkName: "my-source-data" */ "../pages/my-data/my-data.vue"),
          redirect: "/data/type/index",
          meta: { title: "我的数据库" },
          children: [
            {
              path: "index",
              name: "MySourceDataIndex",
              component: () => import(/* webpackChunkName: "my-source-data" */ "../pages/my-data/my-data-type/my-data-index.vue"),
              meta: { title: "我的数据库-index" }
            },
            {
              path: "api",
              name: "MySourceDataAPI",
              component: () => import(/* webpackChunkName: "my-source-data-api" */ "../pages/my-data/my-data-type/my-data-api.vue"),
              meta: { title: "我的数据库-api" }
            },
            {
              path: "csv",
              name: "MySourceDataCSV",
              component: () => import(/* webpackChunkName: "my-source-data-csv" */ "../pages/my-data/my-data-type/my-data-csv.vue"),
              meta: { title: "我的数据库-csv" }
            },
            {
              path: "sql",
              name: "MySourceDataSQL",
              component: () => import(/* webpackChunkName: "my-source-data-sql" */ "../pages/my-data/my-data-type/my-data-sql.vue"),
              meta: { title: "我的数据库-sql" }
            },
            {
              path: "etl",
              name: "MySourceDataETL",
              component: () => import(/* webpackChunkName: "my-source-data-etl" */ "../pages/my-data/my-data-type/my-data-etl.vue"),
              meta: { title: "我的数据库-etl" }
            },
          ]
        },
      ]
    },
    {
      path: "com",
      name: "MyCom",
      component: () => import(/* webpackChunkName: "my-com" */ "../pages/my-com/my-com.vue"),
      meta: { title: "我的组件" },
    },
    {
      path: "course",
      name: "MyCourse",
      component: () => import(/* webpackChunkName: "my-course" */ "../pages/my-course/my-course.vue"),
      meta: { title: "我的教程" },
    }
  ]
}];

export default [
  {
    path: "/login",
    name: "Login",
    component: () => import(/* webpackChunkName: "Login" */ "../pages/login/login.vue")
  },
  ...navRouter,
  {
    path: "/etl",
    name: "ETL",
    component: () => import(/* webpackChunkName: "ELT" */ "../pages/etl-design/etl-design.vue")
  },
  {
    path: "/design/:id",
    name: "Design",
    component: () => import(/* webpackChunkName: "Design" */ "../pages/design/index.vue")
  },
  {
    path: "/test",
    name: "Test",
    component: () => import(/* webpackChunkName: "Test" */ "../pages/test/index.vue")
  }
];